package com.zzf.concurrent.example.design.pattern.thread.local.context;

/**
 * @author GaoFeng2017
 * @date 2019/9/8 16:55
 */
public class OrderContextUtil {
    private static final ThreadLocal<OrderContext> threadLocal = ThreadLocal.withInitial(OrderContext::new);

    public static void setContext(OrderContext context) {
        threadLocal.set(context);
    }

    public static OrderContext getContext() {
        return threadLocal.get();
    }
}
